package select;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import neural.Individual;

public class MixBoltzman extends Mix{
	
	Boltzmann b;

	public MixBoltzman(int eliteSelected) {
		super(eliteSelected);
		b = new Boltzmann(4000);
	}
	


	@Override
	public List<Individual> getOthers(List<Individual> selected, List<Individual> individuals, int amount) {
		Map<Individual,FitnessValues> fitnessMap = new HashMap<Individual,FitnessValues>();
		Double totalFitness = b.calculateFitness(fitnessMap, individuals);
		b.calculateFrequencies(fitnessMap, totalFitness, individuals);
		return b.selectRandomly(fitnessMap, amount, selected);
		
	}

}
